package SingleInputChar;

public class Solution {
    public void insert(){

    }
    public void FirstAppearingOnce(char[] chars)  {
        char c = 0;
        int[] charApperenceTimes = new int[500];
        for(int i =0 ; i < chars.length; i++){
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            int aChar = charApperenceTimes[(int)chars[i]];
            if(0 == charApperenceTimes[(int)chars[i]]){
                System.out.println(chars[i] + " appear first");
                charApperenceTimes[(int)chars[i]]++;
            }else{
                charApperenceTimes[(int)chars[i]]++;
            }

        }
    }
}
